window.addEventListener('load', function () {
    const nameNav = document.querySelector('.name-nav')
    const whiteNav = document.querySelector('.white-nav')
    window.onscroll = function () {
        let st = document.documentElement.scrollTop
        console.log(st)
        if (st > nameNav.offsetHeight) {
            nameNav.style.position = 'fixed'
            nameNav.style.backgroundColor = '#fff'
        }
        else {
            nameNav.style.position = 'static'
        }
    }
})